
package com.oahcfly.chgame.egret.ui.property;

import com.badlogic.gdx.utils.ObjectMap;

/** 纯色区域属性 <e:Rect width="239" height="214" x="118" y="114" fillColor="0xFF0000" fillAlpha="0.8"/>
 * @author haocao */
public class RectProperty extends BaseUIProperty {
	public String fillColor;
	public float fillAlpha = 1f;

	public RectProperty (ObjectMap<String, String> attributes) {
		super(attributes);
		// fillColor="0xFF0000"
		if (attributes.containsKey("fillColor")) {
			// 去除开头0x
			fillColor = attributes.get("fillColor").substring(2);
		} else {
			// 默认黑色
			fillColor = "FFFFFF";
		}

		if (attributes.containsKey("fillAlpha")) {
			// 去除开头0x
			fillAlpha = Float.valueOf(attributes.get("fillAlpha"));
		}
	}

}
